home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / src / fig07_09.jar / Ch07 / Fig07_09 / Employ1.h < prev    next >
C/C++ Source or Header  |  1997-08-24  |  590b  |  26 lines

  1. // Fig. 7.9: employ1.h
  2. // An employee class
  3. #ifndef EMPLOY1_H
  4. #define EMPLOY1_H
  5.  
  6. class Employee {
  7. public:
  8.    Employee( const char*, const char* );  // constructor
  9.    ~Employee();                       // destructor
  10.    const char *getFirstName() const;  // return first name
  11.    const char *getLastName() const;   // return last name
  12.  
  13.    // static member function
  14.    static int getCount();  // return # objects instantiated
  15.  
  16. private:
  17.    char *firstName;
  18.    char *lastName;
  19.  
  20.    // static data member
  21.    static int count;  // number of objects instantiated
  22. };
  23.  
  24. #endif
  25.  
  26.